<script type="text/javascript">
xe.lang.msg_empty_search_target = '{$lang->msg_empty_search_target}';
xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
</script>
<load target="js/document_admin.js" usecdn="true" />
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
	<form id="fo_list" action="./" method="get" class="form">
	<input type="hidden" name="module" value="document" />
	<input type="hidden" name="page" value="{$page}" />
		<h1 class="h1">{$lang->document}</h1>
		<div class="table even">
			<div class="cnb">
				<a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}" <!--@if($search_keyword == '')-->class="active"<!--@end-->>{$lang->all}</a>
				| <a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'N')}" <!--@if($search_target == 'is_secret' && $search_keyword == 'N')-->class="active"<!--@end-->>{$status_name_list['PUBLIC']}</a>
				| <a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'Y')}" <!--@if($search_target == 'is_secret' && $search_keyword == 'Y')-->class="active"<!--@end-->>{$status_name_list['SECRET']}</a>
				| <a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'temp')}" <!--@if($search_target == 'is_secret' && $search_keyword == 'temp')-->class="active"<!--@end-->>{$status_name_list['TEMP']}</a>
				| <a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminDeclared')}">{$lang->cmd_declared_list}</a>
			</div>
			<table width="100%" border="1" cellspacing="0" id="documentListTable">
				<caption>
					<!--@if($search_keyword == '')-->
					{$lang->all}
					<!--@elseif($search_target == 'is_secret' && $search_keyword == 'N')-->
					{$status_name_list['PUBLIC']}
					<!--@elseif($search_target == 'is_secret' && $search_keyword == 'Y')-->
					{$status_name_list['SECRET']}
					<!--@elseif($search_target == 'is_secret' && $search_keyword == 'temp')-->
					{$status_name_list['TEMP']}
					<!--@end-->
					({number_format($total_count)})
					<div class="side">
						<span class="btn"><a href="#listManager" class="modalAnchor" onclick="getDocumentList();">{$lang->document_manager}...</a></span>
					</div>
				</caption>
				<thead>
					<tr>
						<th scope="col" class="title">{$lang->title}</th>
						<th scope="col" class="nowr">{$lang->writer}</th>
						<th scope="col" class="nowr">{$lang->readed_count}</th>
						<th scope="col" class="nowr">{$lang->cmd_vote}(+/-)</th>
						<th scope="col" class="nowr">{$lang->date}</th>
						<th scope="col" class="nowr">{$lang->ipaddress}</th>
						<th scope="col" class="nowr">{$lang->status}</th>
						<th scope="col"><input type="checkbox" data-name="cart" title="Check All" /></th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<th scope="col" class="title">{$lang->title}</th>
						<th scope="col" class="nowr">{$lang->writer}</th>
						<th scope="col" class="nowr">{$lang->readed_count}</th>
						<th scope="col" class="nowr">{$lang->cmd_vote}(+/-)</th>
						<th scope="col" class="nowr">{$lang->date}</th>
						<th scope="col" class="nowr">{$lang->ipaddress}</th>
						<th scope="col" class="nowr">{$lang->status}</th>
						<th scope="col"><input type="checkbox" data-name="cart" title="Check All" /></th>
					</tr>
				</tfoot>
				<tbody>
					<!--@foreach($document_list as $no => $oDocument)-->
					<tr>
						<td class="title"><a href="{getUrl('','document_srl',$oDocument->document_srl)}" target="_blank"><!--@if(trim($oDocument->getTitle()))-->{$oDocument->getTitle()}<!--@else--><em>{$lang->no_title_document}</em><!--@end--></a></td>
						<td class="nowr"><a href="#popup_menu_area" class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</a></td>
						<td class="nowr">{$oDocument->get('readed_count')}</td>
						<td class="nowr">{$oDocument->get('voted_count')}/{$oDocument->get('blamed_count')}</td>
						<td class="nowr">{$oDocument->getRegdate("Y-m-d H:i")}</td>
						<td class="nowr"><a href="{getUrl('search_target','ipaddress','search_keyword',$oDocument->get('ipaddress'))}">{$oDocument->get('ipaddress')}</a></td>
						<td class="nowr">{$status_name_list[$oDocument->get('status')]}</td>
						<td><input type="checkbox" name="cart" value="{$oDocument->document_srl}" /></td>
					</tr>
					<!--@end-->
				</tbody>
			</table>
			<div class="btnArea">
				<span class="btn"><a href="#listManager" class="modalAnchor" onclick="getDocumentList();">{$lang->document_manager}...</a></span>
			</div>
		</div>
	</form>
	<div class="modal" id="listManager">
		<form action="./" method="post" class="fg form" id="manageForm">
		<input type="hidden" name="module" value="document" />
		<input type="hidden" name="act" value="procDocumentManageCheckedDocument" />
		<input type="hidden" name="type" value="" />
		<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList', 'is_secret', $is_secret, 'search_target', $search_target, 'search_keyword', $search_keyword)}" cond="!empty($search_target) && !empty($search_keyword)" />
			<h2 class="h2">{$lang->document_manager}</h2>
			<div class="table even">
				<table width="100%" border="1" cellspacing="0" id="documentManageListTable">
					<caption>{$lang->selected_document} <strong id="selectedDocumentCount"></strong></caption>
					<thead>
						<tr>
							<th scope="col" class="title">{$lang->title}</th>
							<th scope="col" class="nowr">{$lang->writer}</th>
							<th scope="col" class="nowr">{$lang->status}</th>
						</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
			</div>
			<p class="q"><label for="site">{$lang->selected_document_move}</label></p>
			<div class="a">
				<input type="text" name="site_keyword" id="site" />
				<span class="desc"><a href="#suggestion" class="tgAnchor" onclick="getModuleList();">{$lang->find_site}</a></span>
				<p>
					<select name="target_module" id="module_list" style="width:290px">
						<option>{$lang->select_module}</option>
					</select>
				</p>
				<p>
					<select name="module_srl" id="mid_list" style="width:290px">
						<option>{$lang->select_module_id}</option>
					</select>
				</p>
				<p>
					<select id="target_category" name="target_category" style="width:290px">
						<option>{$lang->select_category}</option>
					</select>
				</p>
			</div>
			<p class="q"><label for="message">{$lang->message_notice}</label></p>
			<p>
				<textarea rows="8" cols="42" name="message_content" id="message" style="width:98%"></textarea>
			</p>
			<div class="btnArea">
				<span class="btn"><button type="submit" name="type" value="trash">{$lang->cmd_trash}</button></span>
				<span class="btn"><button type="submit" name="type" value="delete">{$lang->cmd_delete}</button></span>
				<span class="btn"><button type="submit" name="type" value="move">{$lang->cmd_move}</button></span>
				<span class="btn"><button type="submit" name="type" value="copy">{$lang->cmd_copy}</button></span>
			</div>
		</form>
	</div>
	<div class="search">

<form action="./" class="pagination">
	<input type="hidden" name="error_return_url" value="" />
	<input type="hidden" name="module" value="{$module}" />
	<input type="hidden" name="act" value="{$act}" />
	<input cond="$search_keyword" type="hidden" name="search_keyword" value="{$search_keyword}" />
	<input cond="$search_target" type="hidden" name="search_target" value="{$search_target}" />

	<a href="{getUrl('page', '')}" class="direction">&laquo; {$lang->first_page}</a>
	<block cond="$page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page && $page_navigation->page_count != $page_navigation->total_page">
		{@$isGoTo = true}
		<a href="{getUrl('page', '')}">1</a>
		<a href="#goTo" class="tgAnchor" title="{$lang->cmd_go_to_page}">...</a>
	</block>
	<!--@while($page_no = $page_navigation->getNextPage())-->
		{@$last_page = $page_no}
		<strong cond="$page_no == $page">{$page_no}</strong>
		<a cond="$page_no != $page" href="{getUrl('page', $page_no)}">{$page_no}</a>
	<!--@end-->
	<block cond="$last_page != $page_navigation->last_page">
		{@$isGoTo = true}
		<a href="#goTo" class="tgAnchor" title="{$lang->cmd_go_to_page}">...</a>
		<a href="{getUrl('page', $page_navigation->last_page)}">{$page_navigation->last_page}</a>
	</block>
	<a href="{getUrl('page', $page_navigation->last_page)}" class="direction">{$lang->last_page} &raquo;</a>
	<span cond="$isGoTo" id="goTo" class="tgContent">
		<input name="page" title="{$lang->cmd_go_to_page}" />
		<button type="submit">Go</button>
	</span>
</form>

		<form action="./" method="get" class="adminSearch" onsubmit="return checkSearch(this)">
		<input type="hidden" name="module" value="{$module}" />
		<input type="hidden" name="act" value="{$act}" />
		<input type="hidden" name="module_srl" value="{$module_srl}" />
		<input type="hidden" name="error_return_url" value="" />
            <select name="search_target">
                <option value="">{$lang->search_target}</option>
                <!--@foreach($lang->search_target_list as $key => $val)-->
                <option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
                <!--@end-->
			</select>
            <input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
			<input type="submit" value="{$lang->cmd_search}" />
			<a href="#">{$lang->cmd_cancel}</a>
		</form>
	</div>
